﻿@{
    ViewBag.Title = "Manage Reference - Project Management System";
    Layout = "~/Views/Shared/_Layout.cshtml";
    
}
<h2>
    Reference</h2>
<form action="" method="post" id="form" name="formProject">
<input type="hidden" id="Action" name="Action" />
<ul class="shortcut-buttons-set">
    @{if (PMS.Utilities.Utility.RoleID == 2)
      {
        <li><a class="shortcut-button" href="javascript:Action('Hide')"><span>
            <img src="../../Content/images/icons/Actions-view-calendar-upcoming-events-icon.png"
                alt="icon" /><br />
            Hide</span></a></li>
        <li><a class="shortcut-button" href="javascript:Action('Show')"><span>
            <img src="../../Content/images/icons/Actions-view-calendar-tasks-icon.png" alt="icon" /><br />
            Show</span></a></li>
        <li><a class="shortcut-button" href="javascript:Action('Delete')"><span>
            <img src="../../Content/images/icons/Button-Close-icon.png" alt="icon" /><br />
            Delete</span></a></li>
      }
    }
    <li><a class="shortcut-button" href="javascript:Action('Download')"><span>
        <img src="../../Content/images/icons/Download-icon.png" alt="icon" /><br />
        Download</span></a></li>
</ul>
<!-- End .shortcut-buttons-set -->
<div class="clear">
</div>
<!-- End .clear -->
<!-- Search -->
<input type="hidden" id="isSearch" name="isSearch" value="@ViewData["IsSearch"]" />
<div class="content-box">
    <!-- Start Content Box -->
    <div class="content-box-header">
        <h3>
            Reference List</h3>
        <div class="clear">
        </div>
    </div>
    <!-- End .content-box-header -->
    <div class="content-box-content">
        <div>
            <!-- This is the target div. id must match the href of this div's tab -->
            @{ if (TempData["Message"] != null)
               {
                <div class="notification attention png_bg">
                    <a href="#" class="close">
                        <img src="../../Content/images/icons/cross_grey_small.png" title="Close this notification"
                            alt="close" /></a>
                    <div>
                        @TempData["Message"].ToString()
                    </div>
                </div>
               }
            }
            @{ 
                var pageSize = int.Parse(ViewData[PMS.ENT.PageInfo.PageSize.ToString()].ToString());
                var pageNum = int.Parse(ViewData[PMS.ENT.PageInfo.PageNum.ToString()].ToString());
                var page = int.Parse(ViewData[PMS.ENT.PageInfo.Page.ToString()].ToString()); }
            <input type="hidden" name="groupID" id="GroupID" />
            <input type="hidden" value="@ViewData["OrderBy"]" name="orderBy" id="orderBy" />
            <input type="hidden" value="@ViewData["OrderDirection"]" name="orderDirection"
                id="orderDirection" />
            @{if (Model.Count <= 0)
              {
                <div class="RecordFound @("RecordFound" + @Model.Count)">
                    No Record Found</div>
              }
            }
            <table class="flexigird TableGrid">
                <thead>
                    <tr>
                        <th id="Selected">
                            <input class="check-all" type="checkbox" id="checkAll" />
                        </th>
                        <th id="FileName">
                            File Name
                        </th>
                        <th id="FileSize">
                            Size(KB)
                        </th>
                        <th id="isHide">
                            Status
                        </th>
                    </tr>
                </thead>
                @*<tfoot>
                    <tr>
                        <td colspan="6">
                            @{ Html.RenderPartial("Pagination", null, ViewData); }
                            <!-- End .pagination -->
                            <div class="clear">
                            </div>
                        </td>
                    </tr>
                </tfoot>*@
                <tbody>
                    @{ for (int i = 0; i < Model.Count; i++)
                       {
                           if (PMS.Utilities.Utility.RoleID == 2 || (PMS.Utilities.Utility.RoleID == 3 && Model[i].IsHide == 0))
                           {
                        <tr>
                            <td>
                                <input type="checkbox" id="ReferenceID" name="ReferenceID" value="@Model[i].ReferenceID"
                                        group="Selected" onclick="Uncheck('ReferenceID');"  />
                            </td>
                            <td>
                                @Model[i].FileName
                            </td>
                            <td>
                                @(Model[i].FileSize / 1024)
                            </td>
                            <td>
                                @(Model[i].IsHide == 1 ? "Hide" : "Downloadable")
                            </td>
                        </tr>
                           }
                       } 
                    }
                </tbody>
            </table>
            @{Html.RenderPartial("Pagination", null, ViewData); }
        </div>
        <!-- End #tab1 -->
    </div>
    <!-- End .content-box-content -->
</div>
<!-- End .content-box -->
</form>
<script language="javascript" type="text/javascript">
    $("#Referecent").addClass("current");
    $("#Reference").addClass("current");
 

   
  
</script>
